$(function () {
    $('#submit').click(function () {
        var formData = new FormData();
        formData.append("mobile",$('#mobile').val());
        formData.append("psw",$('#psw').val());
        $.ajax({
            url:'/cinema/login',
            type:'post',
            data:formData,
            contentType:false,
            processData:false,
            cache:false,
            success:function (data) {
                if (data.success){
                    $.toast('登录成功！');
                    window.location.href = '/html/index.html';
                } else {
                    $.toast('登录失败！' + data.errMsg);
                }
            }
        });
    });
});